home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1996 June
/
EnigmA AMIGA RUN 08 (1996)(G.R. Edizioni)(IT)[!][issue 1996-06][EARSAN CD VII].iso
/
earcd
/
utmisc1
/
fscode.lha
/
Src
/
Support.a
< prev
Wrap
Text File
|
1995-03-12
|
1KB
|
69 lines
XREF __BSSBAS ; linker defined base of BSS
XREF __BSSLEN ; linker defined length of BSS
SECTION text,code
; VOID DoEncode(STRPTR out, ULONG in, struct Library *UtilityBase)
; A0 D0 A1
JSRUTIL MACRO ;FunctionName
XREF _LVO\1
JSR _LVO\1(A1)
ENDM
XDEF @DoEncode
@DoEncode:
movem.l D2,-(A7)
moveq.l #42,D2 ; set up for later use
moveq.l #85,D1
JSRUTIL UDivMod32
add.l D2,D1
move.b D1,4(A0)
moveq.l #85,D1 ; tmp / 85 already in D0
JSRUTIL UDivMod32
add.l D2,D1
move.b D1,3(A0)
moveq.l #85,D1 ; now tmp / 85 will be less than
divu D1,D0 ; 16 bits, can use divu instead
move.l D0,D1 ; of UDivMod()
ext.l D0
swap D1
add.w D2,D1
move.b D1,2(A0)
moveq.l #85,D1
divu D1,D0
move.l D0,D1
ext.l D0
swap D1
add.w D2,D1
move.b D1,1(A0)
add.l D2,D0 ; last one -- don't need % 85
move.b D0,(A0)
movem.l (A7)+,D2
rts
; stuff() -- required by RawDoFmt()
XDEF _stuff
_stuff move.b D0,(A3)+ ; put data to output string
rts
SECTION __MERGED,data
; prevent picky linker from believing we don't initialize our BSS
dc.l __BSSBAS ; no-ops, only to reference symbols
dc.l __BSSLEN ; and make SLink happy
END